package com.macro.mall.service.impl;

import com.macro.mall.common.api.CommonResult;
import com.macro.mall.mapper.UmsMemberStatisticsInfoMapper;
import com.macro.mall.model.UmsMemberStatisticsInfoResult;
import com.macro.mall.model.UmsMemberStatisticsInfoExample;
import com.macro.mall.service.UmsMemberStatisticsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UmsMemberStatisticsInfoServiceImpl implements UmsMemberStatisticsInfoService {

    @Autowired
    UmsMemberStatisticsInfoMapper umsMemberStatisticsInfoMapper;

    /**
     * 获取会员统计信息
     * @author 孙晓亮
     * @Date 2020年9月15日
     * @return
     */
    @Override
    public CommonResult getMemberStaticticsList() {

        UmsMemberStatisticsInfoExample example=new UmsMemberStatisticsInfoExample();
        List<UmsMemberStatisticsInfoResult> umsMemberStatisticsInfoResultList = umsMemberStatisticsInfoMapper.selectStastistics(example);
        return CommonResult.success(umsMemberStatisticsInfoResultList);
    }
}
